import Vue from 'vue'
import VueRouter from 'vue-router'
import Index from '../components/Index.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    redirect: '/helloworld'
  },
  {
    path: '/index',
    component: Index,
    redirect: '/helloworld',
    children: [
      {path: '/helloworld', component: () => import('../components/HelloWorld.vue')},
      {path: '/frp', component: () => import('../views/frp/frp.vue')},
    ]
  }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})


export default router
